/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package ocp.service;

import java.io.Serializable;
import java.util.Date;

/**
 *
 * @author Francisco
 */
public class Interval implements Serializable  {

    private Long begin;
    private Long end;
    
    public Interval(long begin, long end)
    {
        this.begin = Long.valueOf(begin);
        this.end = Long.valueOf(end);
    }

    public Long getBegin()
    {
        return begin;
    }

    public Date getBeginDate()
    {
        return new Date(end.longValue());
    }

    public void setBegin(Long begin)
    {
        this.begin = begin;
    }

    public Long getEnd()
    {
        return end;
    }

    public Date getEndDate()
    {
        return new Date(end.longValue());
    }

    public void setEnd(Long end)
    {
        this.end = end;
    }

    public String toString()
    {
        return (new StringBuilder()).append("Intervalo: [").append(begin).append(",").append(end).append("]").toString();
    }

}